#include <iostream>
#include "Stopper.h"

using namespace std;

namespace test_Stopper {

	void delay(int time, TimeUnit unit) {
		Stopper st;
		while( st.getTime(unit) < time);
	}

	void test() {
		cout<< "SECONDS = " << TimeUnit::value(TimeUnit::SECONDS) << " CT" << endl;
		delay(2, TimeUnit::SECONDS);

		Stopper st, st2;

		st.setDefTimeUnit(TimeUnit::SECONDS, true);
		while(st.getTime(TimeUnit::SECONDS) < 6) {
			if(st2.getTime(TimeUnit::MILI_SEC) >= 100) {
				st2.start();
				cout<< st << endl;
			}
		}
	}
}

